package test;

import java.awt.Graphics2D;

import stats.AmountStats;
import stats.ScoreStats;

import com.golden.gamedev.Game;

public class TrickyGame extends Game 
{
	AmountStats myAmount;
	ScoreStats myScore;
	int x1 = 100;
	int x2 = 200;
	int y = 50;
	int old_y = y;
	
	public void initResources() {
        myAmount = new AmountStats();
        myScore = new ScoreStats();
        myScore.addWeight(0.5, "test");
    }

    public void update(long elapsedTime) {
        if (click())
        {
        	myAmount.update("test");
        	myScore.update("test");
        	old_y = y;
        	y += 20;
        }
        
    }

    public void render(Graphics2D g) {
    	if (y!=old_y)
    	{
    		g.drawString(Double.toString(myAmount.getResult("test")), x1, y);
    		g.drawString(Double.toString(myScore.getResult("test")), x2, y);
    	}
    }
}
